package com.amtf.datafile3;

import java.util.Collection;
import java.util.List;

public interface DataTableDefinition {

	public DataRecord newDataRecordInstance();

	// public DataRecord parse();

	public String getName();

	public void setName(String name);

	public DataTableDefinition clone();

	// public List<DataFieldDefinition> addFields(int count, DataFieldDefinition fieldDefinition);

	public void addField(DataFieldDefinition fieldDefinition);

	public void insertField(int index, DataFieldDefinition fieldDefinition);

	public void addFields(Collection<DataFieldDefinition> all);

	public DataFieldDefinition getField(int column);

	public DataFieldDefinition getField(String columnName);

	public DataFieldDefinition removeField(int index);

	public DataFieldDefinition removeField(String name);

	public List<DataFieldDefinition> getFields();

	public int getFieldCount();

	public String[] getFieldNames();

	// public boolean isFirstRowTitle();

	public void removeAll();

	// -------------------------------------------------------------

	public DataRecordParser getParser();

	public void setParser(DataRecordParser parser);

	public DataRecordRender getRender();

	public void setRender(DataRecordRender Render);

	// -------------------------------------------------------------

	public void parseTitle(Object value) throws DataException;

	public DataRecord parse(Object value) throws DataException;

	public void validate(DataRecord value);

	public String rending(DataRecord value);
}
